clear all
cap close
set more off
set mem 800m

cd ".\Data_Program"

* Table 7
use beforereg_sci,clear


* IV using cr08 in 2008 as instrument

* Panel 1, Col 1 
reghdfe dfinshare2 cr08_wt2 cr08_wt bankshare hpgr popgr empgr fracy fracb subprime edu hpgr2 popgr2 empgr2 fracy2 fracb2 subprime2  edu2  dfinad dfinad2 [aw=w], a(state)

* Panel 1, Col 2   
ivreghdfe dfinshare (dfinshare2 =cr08_wt2) cr08_wt bankshare hpgr popgr empgr fracy fracb subprime edu hpgr2 popgr2 empgr2 fracy2 fracb2 subprime2  edu2  dfinad dfinad2 [aw=w], a(state) first


* IV using outcz cr08 as instrument

* Panel 1, Col 3
reghdfe dfinshare2 cr08_wt_outcz2 cr08_wt bankshare hpgr popgr empgr fracy fracb subprime edu hpgr2 popgr2 empgr2 fracy2 fracb2 subprime2 edu2 dfinad dfinad2 [aw=w], a(state) 

* Panel 1, Col 4
ivreghdfe dfinshare (dfinshare2 =cr08_wt_outcz2) cr08_wt bankshare hpgr popgr empgr fracy fracb subprime edu hpgr2 popgr2 empgr2 fracy2 fracb2 subprime2 edu2 dfinad dfinad2 [aw=w], a(state) first 

* OLS: Panel 1, Col 5
reghdfe dfinshare dfinshare2 cr08_wt bankshare hpgr popgr empgr fracy fracb subprime dfinad  hpgr2 popgr2 empgr2 fracy2 fracb2 subprime2 dfinad2 edu2 dfinad dfinad2 [aw=w], a(state)  



* IV using big4 share in 2008 as instrument

* Panel 2, Col 1
reghdfe dfinshare2 big4share_wt2 cr08_wt bankshare hpgr popgr empgr fracy fracb subprime edu hpgr2 popgr2 empgr2 fracy2 fracb2 subprime2  edu2 dfinad dfinad2 [aw=w], a(state) 

* Panel 2, Col 2
ivreghdfe dfinshare (dfinshare2 = big4share_wt2) cr08_wt bankshare hpgr popgr empgr fracy fracb subprime edu hpgr2 popgr2 empgr2 fracy2 fracb2 subprime2  edu2 dfinad dfinad2 [aw=w], a(state) first 

* IV using outcz big4 as instrument

* Panel 2, Col 3
reghdfe dfinshare2 big4share_wt_outcz2 cr08_wt bankshare hpgr popgr empgr fracy fracb subprime edu hpgr2 popgr2 empgr2 fracy2 fracb2 subprime2 edu2 dfinad dfinad2 [aw=w], a(state)

* Panel 2, Col 4
ivreghdfe dfinshare (dfinshare2 =big4share_wt_outcz2 ) cr08_wt bankshare hpgr popgr empgr fracy fracb subprime edu hpgr2 popgr2 empgr2 fracy2 fracb2 subprime2 edu2 dfinad dfinad2 [aw=w], a(state) first 


